﻿
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>Google Map</title>
     <script src="http://ditu.google.com/maps?file=api&amp;v=2&amp;key=AIzaSyAkmwamRkF9pG9cRUg6t1GEYt5dMFLuPTI"
             type="text/javascript"></script>
    <script type="text/javascript">

    var map;
    var latlng;
    var myOptions;

    
    function load()
    {
    
        map = new GMap2(document.getElementById("map"));
        map.enableContinuousZoom();
        map.enableScrollWheelZoom();
        map.addControl(new GSmallMapControl());
	    map.addControl(new GMapTypeControl());
        map.setCenter(new GLatLng(39,116),5);

    }
        
    function clearallmarker()
    {
        map.clearOverlays();
    }
    
    function movemarker(w ,j,i,add,sub)
	{
	
		var point = new GLatLng(w, j);  
		map.setCenter(point,15);
        var mk1=new GMarker(point); 
        GEvent.addListener(mk1, "click", function () 
                                                {  mk1.openInfoWindowHtml(i.toString() + " " + mk1.getPoint().toString() + "<br>" +"入水温度：" + add.toString()+"，出水温度："+sub.toString());}
			              )
	    function viewpoint()
	    {
	         mk1.openInfoWindowHtml(i.toString() + " " + mk1.getPoint().toString() + "<br>" + "入水温度：" + add.toString()+"，出水温度："+sub.toString());
	    }  


        
       var p=new GLatLng(w, j);

       
       mk1.setPoint(p);

       map.addOverlay(mk1);
       viewpoint();
       
	}
	
    function flyto(weidu,jingdu)
    { 
	    map.panTo(new GLatLng(weidu,jingdu));
	}
	    
    </script>
</head>
<body onload="load()">
    <div id="map" style="width: 500px; height: 500px"></div>

</body>
</html>
